/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package sp.model;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Thosan Girisona S
 */
@Entity
@Table(name = "kortim")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Kortim.findAll", query = "SELECT k FROM Kortim k"),
    @NamedQuery(name = "Kortim.findByNokortim", query = "SELECT k FROM Kortim k WHERE k.nokortim = :nokortim"),
    @NamedQuery(name = "Kortim.findByNimkortim", query = "SELECT k FROM Kortim k WHERE k.nimkortim = :nimkortim"),
    @NamedQuery(name = "Kortim.findByNamakortim", query = "SELECT k FROM Kortim k WHERE k.namakortim = :namakortim"),
    @NamedQuery(name = "Kortim.findByNohp", query = "SELECT k FROM Kortim k WHERE k.nohp = :nohp"),
    @NamedQuery(name = "Kortim.findByNohpcadangan", query = "SELECT k FROM Kortim k WHERE k.nohpcadangan = :nohpcadangan"),
    @NamedQuery(name = "Kortim.findByNokorwil", query = "SELECT k FROM Kortim k WHERE k.nokorwil = :nokorwil"),
    @NamedQuery(name = "Kortim.findByUserId", query = "SELECT k FROM Kortim k WHERE k.userId = :userId"),
    @NamedQuery(name = "Kortim.findByEmail", query = "SELECT k FROM Kortim k WHERE k.email = :email"),
    @NamedQuery(name = "Kortim.findByCreatedAt", query = "SELECT k FROM Kortim k WHERE k.createdAt = :createdAt"),
    @NamedQuery(name = "Kortim.findByUpdatedAt", query = "SELECT k FROM Kortim k WHERE k.updatedAt = :updatedAt")})
public class Kortim implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "nokortim")
    private String nokortim;
    @Basic(optional = false)
    @Column(name = "nimkortim")
    private String nimkortim;
    @Basic(optional = false)
    @Column(name = "namakortim")
    private String namakortim;
    @Basic(optional = false)
    @Column(name = "nohp")
    private String nohp;
    @Basic(optional = false)
    @Column(name = "nohpcadangan")
    private String nohpcadangan;
    @Basic(optional = false)
    @Column(name = "nokorwil")
    private String nokorwil;
    @Basic(optional = false)
    @Column(name = "user_id")
    private int userId;
    @Column(name = "EMAIL")
    private String email;
    @Basic(optional = false)
    @Column(name = "created_at")
    @Temporal(TemporalType.TIMESTAMP)
    private Date createdAt;
    @Basic(optional = false)
    @Column(name = "updated_at")
    @Temporal(TemporalType.TIMESTAMP)
    private Date updatedAt;

    public Kortim() {
    }

    public Kortim(String nokortim) {
        this.nokortim = nokortim;
    }

    public Kortim(String nokortim, String nimkortim, String namakortim, String nohp, String nohpcadangan, String nokorwil, int userId, Date createdAt, Date updatedAt) {
        this.nokortim = nokortim;
        this.nimkortim = nimkortim;
        this.namakortim = namakortim;
        this.nohp = nohp;
        this.nohpcadangan = nohpcadangan;
        this.nokorwil = nokorwil;
        this.userId = userId;
        this.createdAt = createdAt;
        this.updatedAt = updatedAt;
    }

    public String getNokortim() {
        return nokortim;
    }

    public void setNokortim(String nokortim) {
        this.nokortim = nokortim;
    }

    public String getNimkortim() {
        return nimkortim;
    }

    public void setNimkortim(String nimkortim) {
        this.nimkortim = nimkortim;
    }

    public String getNamakortim() {
        return namakortim;
    }

    public void setNamakortim(String namakortim) {
        this.namakortim = namakortim;
    }

    public String getNohp() {
        return nohp;
    }

    public void setNohp(String nohp) {
        this.nohp = nohp;
    }

    public String getNohpcadangan() {
        return nohpcadangan;
    }

    public void setNohpcadangan(String nohpcadangan) {
        this.nohpcadangan = nohpcadangan;
    }

    public String getNokorwil() {
        return nokorwil;
    }

    public void setNokorwil(String nokorwil) {
        this.nokorwil = nokorwil;
    }

    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public Date getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(Date createdAt) {
        this.createdAt = createdAt;
    }

    public Date getUpdatedAt() {
        return updatedAt;
    }

    public void setUpdatedAt(Date updatedAt) {
        this.updatedAt = updatedAt;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (nokortim != null ? nokortim.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Kortim)) {
            return false;
        }
        Kortim other = (Kortim) object;
        if ((this.nokortim == null && other.nokortim != null) || (this.nokortim != null && !this.nokortim.equals(other.nokortim))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "sp.model.Kortim[ nokortim=" + nokortim + " ]";
    }
    
}
